<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://unpkg.com/vue@next"></script>
</head>

<body>
    <div id="app"></div>
</body>
<script>
    const myMixin = {
        data () {
            return {
                num: 10,
            }
        },
        created () {
        },
        // 添加自定义属性
        alex: 'alex mixin'
    }
    let vm = {
        data () {
            return {
                num: 100
            }
        },
        created () {
        },
        mixins: [myMixin],
        alex: 'alex App',

    }
    const app = Vue.createApp(vm)
    app.config.optionMergeStrategies.alex = (toVal, fromVal) => {
        // console.log(fromVal, toVal)
        console.log(typeof toVal);
        return fromVal || toVal
    }
    app.mount('#app')
</script>

</html>